<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Flashgame
 * @version    $Id: index.tpl 6755 2010 YouNet $
 * @author     To Anh
 */
?>
<script type="text/javascript">
  var pageAction =function(page){
    document.getElementById('page').value = page;
    document.getElementById('filter_form').submit();
  }

</script>
<h2><?php echo $this->translate("Games Plugin") ?></h2>

<?php if( count($this->navigation) ): ?>
  <div class='tabs'>
    <?php
      // Render the menu
      //->setUlClass()
      echo $this->navigation()->menu()->setContainer($this->navigation)->render()
    ?>
  </div>
<?php endif; ?>



<?php 

    //echo $this->form->render($this) 
    if (count($this->clients) > 0):
?>
    <?php echo $this->totalclients . $this->translate(" client(s) found."); ?>
    <table class='admin_table'>
      <thead>
        <tr>
          <th><?php //echo $this->translate("Username") ?></th>
          <th><?php echo $this->translate("Email") ?></th>
          <th><?php echo $this->translate("First Name") ?></th>
          <th><?php echo $this->translate("Last Name") ?></th>
          <th><?php echo $this->translate("Street") ?></th>
          <th><?php echo $this->translate("City") ?></th>
          <th><?php echo $this->translate("State") ?></th>
          <th><?php echo $this->translate("Zipcode") ?></th>
          <th><?php echo $this->translate("Country") ?></th>
          <th><?php echo $this->translate("Options") ?></th>
        </tr>
      </thead>
        <tbody>
        <?php foreach( $this->clients as $client ): ?>
            <tr>             
                <td><?php //echo $client->client_user_id; ?></td>
                <td><?php echo $client->client_email; ?></td>
                <td><?php echo $client->client_firstname; ?></td>
                <td><?php echo $client->client_lastname; ?></td>
                <td><?php echo $client->client_street; ?></td>
                <td><?php echo $client->client_city; ?></td>
                <td><?php echo $client->client_state; ?></td>
                <td><?php echo $client->client_zipcode; ?></td>
                <td><?php echo $client->client_country; ?></td>
                <td>
                    <a href="<?php echo $this->url(array('client_id' => $client->clients_id), 'flashgame_admin_manage_payment_incomes') ?>">
                        <?php echo $this->translate("view payments"); ?>
                    </a>
                    
                </td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
<?php
    else:
?>

        
<?php endif; ?>

<div> 
    <?php echo $this->paginationControl($this->clients); ?>
</div>
